package com.arpa.ntocc.common.domain.dto;

import com.arpa.ntocc.common.domain.enums.SystemEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 资源信息DTO
 * @program: ntocc
 * @Date: 2019-08-12 14:42
 * @Author: LEO
 * @Description:
 */
@Data
public class ResourceDTO {

    @ApiModelProperty(value = "资源标识")
    private String code;

    @ApiModelProperty(value = "上级资源标识",required = true)
    private String parentCode;

    @ApiModelProperty(value = "资源层级",required = true)
    @NotNull(message = "资源层级不能为空")
    private Integer level;

    @ApiModelProperty(value = "资源名称",required = true)
    @NotEmpty(message = "资源名称不能为空")
    private String name;

    @ApiModelProperty(value = "菜单名")
    private String title;

    @ApiModelProperty(value = "跳转")
    private String redirect;

    @ApiModelProperty(value = "资源权限",required = true)
    @NotEmpty(message = "资源权限不能为空")
    private String permission;

    @ApiModelProperty(value = "资源url")
    private String url;

    @ApiModelProperty(value = "vue组件路径")
    private String component;

    @ApiModelProperty(value = "排序")
    @NotNull(message = "排序不能为空")
    private Integer sort;

    @ApiModelProperty(value = "图标")
    private String icon;

    @ApiModelProperty(value = "所属系统",required = true)
    @NotNull(message = "所属系统不能为空")
    private SystemEnum belong;

    @ApiModelProperty(value = "机构code")
    private String branchCode;

    @ApiModelProperty(value = "是否隐藏路由")
    private boolean hidden;

    @ApiModelProperty(value = "是否使用缓存，使用缓存则页面切换回来原来操作的数据还在，默认为true，表示不使用缓存；")
    private boolean noCache;
}
